/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package publics.events;

import entity.Event;
import entity.User;
import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

/**
 *
 * @author Marta
 */
@ManagedBean ( name = "eventPreviewLoader")
@ApplicationScoped
public class eventPreviewLoader {
    //tmp function just for test
    public List<Event> loadList()
    {
        List<Event> list = new ArrayList<>();
        for (int i = 0; i < 50; i++)
        {
            Event event = new Event();
            User owner = new User();
            owner.setEmail("test@test.it");
            owner.setName("ciao");
            owner.setGroupName("user");
            event.setOwner(owner);
            event.setEventID(Long.MIN_VALUE);
            event.setCancelled(true);
            event.setPublicEvent(true);
            list.add(event);
        }
        return list;
    }
}
